package com.ruoyi.ruoyixingyue.modules.api.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程表
 * </p>
 *
 * @author lzz
 * @since 2024-02-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("xy_course")
@ApiModel(value="Course对象", description="课程表")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "课程名称")
    private String name;

    @ApiModelProperty(value = "教师id")
    private Long teacherId;

    @ApiModelProperty(value = "课程类型")
    private Long typeId;

    @ApiModelProperty(value = "封面链接")
    private String coverUrl;

    @ApiModelProperty(value = "售卖方式0付费，1：免费")
    private Integer free;

    @ApiModelProperty(value = "课程价格，单位为分")
    private BigDecimal price;

    @ApiModelProperty(value = "课程状态，1：待上架，2：已上架，3：下架，4：已完结")
    private Integer status;

    @ApiModelProperty(value = "课程评价得分，45代表4.5星")
    private Integer score;

    @ApiModelProperty(value = "课程总时长")
    private Integer mediaDuration;

    @ApiModelProperty(value = "课程总节数，包括练习")
    private Integer sectionNum;

    @ApiModelProperty(value = "最近一次发布时间")
    private LocalDateTime publishTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除")
    private Integer deleted;


}
